<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Basic</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../../dist/taggd.css">
    <link rel="stylesheet" href="./assets/layout.css" />
  </head>
  <body>
    <header class="header">
      <ul>
        <li class="active"><a href="./basic.html">Basic</a></li>
        <li><a href="./editor.html">Editor</a></li>
      </ul>
      <ul>
        <li><button id="action-add">Add random tags</button></li>
        <li><button id="action-delete">Delete all tags</button></li>
      </ul>
    </header>
    <main class="container">
      <img src="../assets/1024x512.jpg" alt="" id="image" />
    </main>
    <script src="./functions.js"></script>
    <script src="../../dist/taggd.umd.js"></script>
    <script>
      var image = document.getElementById('image')

      var taggd = new Taggd(image, {}, [createTag(), createTag(), createTag()])

      document.getElementById('action-add').addEventListener('click', function addRandomTags() {
        for (var i = 0; i < 4; i++) {
          taggd.addTag(createTag())
        }
      })

      document.getElementById('action-delete').addEventListener('click', function deleteTags() {
        taggd.deleteTags()
      })
    </script>
  </body>
</html>
